package web.servlet.server;

/**
 * @author chenkh
 * @time 2020/11/23 15:40
 */
public interface WebServer {
    /**
     * Starts the web server. Calling this method on an already started server has no
     * effect.
     */
    void start();

    /**
     * Stops the web server. Calling this method on an already stopped server has no
     * effect.
     */
    void stop();

    /**
     * Return the port this server is listening on.
     * @return the port (or -1 if none)
     */
    int getPort();
}
